/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package org.zzz.view.teacherControl;

import javax.swing.*;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableColumnModel;
import javax.swing.table.TableModel;

import org.zzz.controller.AttendanceController;
import org.zzz.controller.TeacherController;
import org.zzz.controller.UserController;
import org.zzz.entity.AttendanceVo;
import org.zzz.entity.Teacher;
import org.zzz.entity.TeacherVo;
import org.zzz.entity.vo.AttendanceShowVo;
import org.zzz.utils.Result;
import org.zzz.utils.ResultEnum;
import org.zzz.view.enterFrame;
import org.zzz.view.util.UiUtil;

import java.util.List;

/**
 * @author AFun
 */
public class teacherViewFrame extends JFrame {

    /**
     * Creates new form teacherFrame
     */
//    public teacherViewFrame(String teaName) {
//        initComponents();
//        init(teaName);         //初始化
//    }
    public teacherViewFrame(String teacherId) {
        this.type = 0;
        this.teacherId = teacherId;
        initComponents();
        init(teacherId);         //初始化
    }

    public teacherViewFrame(enterFrame ef,String teacherId) {
        this.ef = ef;
        this.type = 0;
        this.teacherId = teacherId;
        initComponents();
        init(teacherId);         //初始化
    }

//    public teacherViewFrame(javax.swing.JTable stats,String teacherId,
//                            Integer type,String value) {
//        this.type = type;
//        if (type == 1){
//            //日期
//            this.date = value;
//        }else if (type == 2){
//            //姓名
//            this.sname = value;
//        }else{
//            //班级
//            this.classId = value;
//        }
//        System.out.println(type);
//        this.teacherId = teacherId;
//        initComponents();
//        init(teacherId);         //初始化
//    }

    public void setTable(int type,String value) {
        this.type = type;
        AttendanceController attendanceController = new AttendanceController();
        Result<List<AttendanceShowVo>> listResult = null;
        if (this.type == 0) {
            listResult = attendanceController.listAttendance(teacherId);
        }else if (this.type == 1) {
            //日期
            this.date = value;
            listResult = attendanceController.listAttendanceByDate(teacherId, date);
        }else if(this.type == 2) {
            //姓名
            this.sname = value;
            listResult = attendanceController.listAttendanceBySname(teacherId, sname);
        }else {
            //班级
            this.classId = value;
            listResult = attendanceController.listAttendanceByClassId(teacherId, classId);
        }
        //初进页面显示所有信息
        if (listResult.getStatus() == ResultEnum.SUCCESS.getStatus()) {
            List<AttendanceShowVo> data = listResult.getData();
            for (AttendanceShowVo datum : data) {
                DefaultTableModel model = (DefaultTableModel) this.stats.getModel();
                //日期，学号，姓名，班级，课程，考勤状态，id
                model.addRow(new Object[]{datum.getTime(), datum.getSid(), datum.getSname(), datum.getClassName(), datum.getCourseName(), datum.getStatus(), datum.getId()});
            }
        }
    }

    public void removeTable() {
        if(this.stats.getRowCount()!=0){
            DefaultTableModel model = (DefaultTableModel) this.stats.getModel();
            while (0 != model.getRowCount()) {
                model.removeRow(0);
            }
        }
    }

    private void init(String teacherId) {

        UserController userController = new UserController();
        Result<TeacherVo> teacherById = userController.getTeacherById(teacherId);
        TeacherVo teacherVo = teacherById.getData();
        this.setTitle("欢迎您！" + teacherVo.getName());
        UiUtil.setFrameCenter(this);
        this.setResizable(false);
        //设置考勤状态为组合框形式
        String[] items = {"出勤", "请假", "旷课", "迟到", "早退"};
        JComboBox comboBox = new JComboBox(items);
        DefaultCellEditor dc = new DefaultCellEditor(comboBox);
        TableColumnModel columnModel = this.stats.getColumnModel();
        columnModel.getColumn(5).setCellEditor(dc);
        this.setTable(this.type,null);
//        AttendanceController attendanceController = new AttendanceController();
//        Result<List<AttendanceShowVo>> listResult = null;
//        if (this.type == 0){
//        listResult = attendanceController.listAttendance(teacherId);
//        }else if(this.type == 1){
//            //日期
//            listResult = attendanceController.listAttendanceByDate(teacherId,date);
//        }else if(this.type == 2){
//            //姓名
//            listResult = attendanceController.listAttendanceBySname(teacherId, sname);
//        }else{
//            //班级
//            listResult = attendanceController.listAttendanceByClassId(teacherId,classId);
//        }
//        System.out.println("type:    " + this.type);
//        System.out.println("date:    " + this.date);
//        System.out.println("sname:    " + this.sname);
//        System.out.println("classId:    " + this.classId);
//        System.out.println("teacherId:    " + this.teacherId);

//        System.out.println(listResult);
//        DefaultTableModel tableModel = (DefaultTableModel)stats.getModel();
//        jScrollPane1.validate();
//        jScrollPane1.updateUI();
//        System.out.println(stats.getRowCount());
//        tableModel.setRowCount(0);


        //初进页面显示所有信息
//        if (listResult.getStatus() == ResultEnum.SUCCESS.getStatus()){
//            List<AttendanceShowVo> data = listResult.getData();
//            for (AttendanceShowVo datum : data) {
//                DefaultTableModel model = (DefaultTableModel)this.stats.getModel();
//                //日期，学号，姓名，班级，课程，考勤状态，id
//                model.addRow(new Object[]{datum.getTime(),datum.getSid(),datum.getSname(),datum.getClassName(),datum.getCourseName(),"出勤",datum.getId()});
//            }
//        }
//        System.out.println(tableModel.getRowCount());


    }

    public teacherViewFrame() {
        initComponents();
        UiUtil.setFrameCenter(this);
        this.setResizable(false);
    }


//    private void init(String teaName){
//        this.setTitle("欢迎您！"+teaName);
//        UiUtil.setFrameCenter(this);
//        this.setResizable(false);
//        //设置考勤状态为组合框形式
//        String[] items={"出勤","请假","旷课","迟到","早退"};
//        JComboBox comboBox=new JComboBox(items);
//        DefaultCellEditor dc=new DefaultCellEditor(comboBox);
//        this.stats.getColumnModel().getColumn(4).setCellEditor(dc);
//    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
//    private void initComponents() {
//
//        jScrollPane1 = new JScrollPane();
//        jTable1 = new javax.swing.JTable();
//        jProgressBar1 = new javax.swing.JProgressBar();
//        jButton2 = new javax.swing.JButton();
//        jPanel1 = new javax.swing.JPanel();
//        jScrollPane3 = new JScrollPane();
//        stats = new javax.swing.JTable();
//        submit = new javax.swing.JButton();
//        jButton3 = new javax.swing.JButton();
//        jButton4 = new javax.swing.JButton();
//
//        jTable1.setModel(new DefaultTableModel(
//                new Object[][]{
//                        {null, null, null, null},
//                        {null, null, null, null},
//                        {null, null, null, null},
//                        {null, null, null, null}
//                },
//                new String[]{
//                        "Title 1", "Title 2", "Title 3", "Title 4"
//                }
//        ));
////        jScrollPane1.setViewportView(jTable1);
//        jScrollPane1.setViewportView(stats);
//
//        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
//
//        jButton2.setText("查询考勤信息");
//        jButton2.addActionListener(new java.awt.event.ActionListener() {
//            @Override
//            public void actionPerformed(java.awt.event.ActionEvent evt) {
//                jButton2ActionPerformed(evt);
//            }
//        });
//
//        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("本学期所有学生的考勤状态"));
//
//        stats.setBackground(new java.awt.Color(214, 217, 223));
//        stats.setModel(new DefaultTableModel(
//                new Object[][]{
//
//                },
//                new String[]{
//                        "日期", "学号", "姓名", "班级", "课程", "考勤状态", "id"
//                }
//        )
//                       {
//                           boolean[] canEdit = new boolean [] {
//                                   false, false, false, false, false,true
//                           };
//
//                           public boolean isCellEditable(int rowIndex, int columnIndex) {
//                               return canEdit [columnIndex];
//                           }
//                       }
//
//        );
//        stats.getTableHeader().setReorderingAllowed(false);
//        jScrollPane3.setViewportView(stats);
//        if (stats.getColumnModel().getColumnCount() > 0) {
//            stats.getColumnModel().getColumn(0).setResizable(false);
//            stats.getColumnModel().getColumn(1).setResizable(false);
//            stats.getColumnModel().getColumn(2).setResizable(false);
//            stats.getColumnModel().getColumn(3).setResizable(false);
//            stats.getColumnModel().getColumn(4).setResizable(false);
//            stats.getColumnModel().getColumn(5).setResizable(false);
//            stats.getColumnModel().getColumn(6).setMinWidth(0);
//            stats.getColumnModel().getColumn(6).setMaxWidth(0);
//        }
//
//        submit.setText("提交");
//        submit.addActionListener(new java.awt.event.ActionListener() {
//            @Override
//            public void actionPerformed(java.awt.event.ActionEvent evt) {
//                submitActionPerformed(evt);
//            }
//        });
//
//        jButton3.setText("返回");
//        jButton3.addActionListener(new java.awt.event.ActionListener() {
//            @Override
//            public void actionPerformed(java.awt.event.ActionEvent evt) {
//                jButton3ActionPerformed(evt);
//            }
//        });
//
//        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
//        jPanel1.setLayout(jPanel1Layout);
//        jPanel1Layout.setHorizontalGroup(
//                jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
//                        .addGroup(jPanel1Layout.createSequentialGroup()
//                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
//                                        .addGroup(jPanel1Layout.createSequentialGroup()
//                                                .addContainerGap()
//                                                .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 613, javax.swing.GroupLayout.PREFERRED_SIZE))
//                                        .addGroup(jPanel1Layout.createSequentialGroup()
//                                                .addGap(68, 68, 68)
//                                                .addComponent(submit)
//                                                .addGap(230, 230, 230)
//                                                .addComponent(jButton3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
//                                                .addGap(76, 76, 76)))
//                                .addContainerGap(11, Short.MAX_VALUE))
//        );
//        jPanel1Layout.setVerticalGroup(
//                jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
//                        .addGroup(jPanel1Layout.createSequentialGroup()
//                                .addContainerGap()
//                                .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 277, javax.swing.GroupLayout.PREFERRED_SIZE)
//                                .addGap(18, 18, 18)
//                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
//                                        .addComponent(submit)
//                                        .addComponent(jButton3))
//                                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
//        );
//
//        jButton4.setText("录入考勤信息");
//        jButton4.addActionListener(new java.awt.event.ActionListener() {
//            @Override
//            public void actionPerformed(java.awt.event.ActionEvent evt) {
//                jButton4ActionPerformed(evt);
//            }
//        });
//
//        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
//        getContentPane().setLayout(layout);
//        layout.setHorizontalGroup(
//                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
//                        .addGroup(layout.createSequentialGroup()
//                                .addGap(29, 29, 29)
//                                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
//                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
//                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
//                                        .addComponent(jButton4)
//                                        .addComponent(jButton2))
//                                .addGap(28,28,28))
//        );
//        layout.setVerticalGroup(
//                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
//                        .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
//                                .addGap(32, 32, 32)
//                                .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
//                                .addContainerGap())
//                        .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
//                                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
//                                .addComponent(jButton4)
//                                .addGap(51, 51, 51)
//                                .addComponent(jButton2)
//                                .addGap(72, 72, 72))
//        );
//
//        pack();
//    }// </editor-fold>//GEN-END:initComponents

    private void initComponents() {

        jScrollPane1 = new javax.swing.JScrollPane();
        jTable1 = new javax.swing.JTable();
        jProgressBar1 = new javax.swing.JProgressBar();
        jButton2 = new javax.swing.JButton();
        jPanel1 = new javax.swing.JPanel();
        jScrollPane3 = new javax.swing.JScrollPane();
        stats = new javax.swing.JTable();
        submit = new javax.swing.JButton();
        jButton3 = new javax.swing.JButton();
        jButton4 = new javax.swing.JButton();

        jTable1.setModel(new javax.swing.table.DefaultTableModel(
                new Object [][] {
                        {null, null, null, null},
                        {null, null, null, null},
                        {null, null, null, null},
                        {null, null, null, null}
                },
                new String [] {
                        "Title 1", "Title 2", "Title 3", "Title 4"
                }
        ));
        jScrollPane1.setViewportView(jTable1);

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jButton2.setText("查询考勤信息");
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            @Override
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });

        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(titledborder));

        stats.setBackground(new java.awt.Color(214, 217, 223));
        stats.setModel(new javax.swing.table.DefaultTableModel(
                new Object [][] {

                },
                new String [] {
                        "日期", "班级", "学号", "姓名", "课程", "考勤状态", "id"
                }
        ) {
            boolean[] canEdit = new boolean [] {
                    false, false, false, false, false, true, false
            };
            @Override
            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane3.setViewportView(stats);
        stats.getTableHeader().setReorderingAllowed(false);
        if (stats.getColumnModel().getColumnCount() > 0) {
            stats.getColumnModel().getColumn(0).setResizable(false);
            stats.getColumnModel().getColumn(1).setResizable(false);
            stats.getColumnModel().getColumn(2).setResizable(false);
            stats.getColumnModel().getColumn(3).setResizable(false);
            stats.getColumnModel().getColumn(4).setResizable(false);
            stats.getColumnModel().getColumn(5).setResizable(false);
            stats.getColumnModel().getColumn(6).setMinWidth(0);
            stats.getColumnModel().getColumn(6).setPreferredWidth(0);
            stats.getColumnModel().getColumn(6).setMaxWidth(0);
        }

        submit.setText("提交");
        submit.addActionListener(new java.awt.event.ActionListener() {
            @Override
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                submitActionPerformed(evt);
            }
        });

        jButton3.setText("返回");
        jButton3.addActionListener(new java.awt.event.ActionListener() {
            @Override
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton3ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
                jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanel1Layout.createSequentialGroup()
                                .addContainerGap()
                                .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 613, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGap(129, 129, 129)
                                .addComponent(submit)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jButton3)
                                .addGap(164, 164, 164))
        );
        jPanel1Layout.setVerticalGroup(
                jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanel1Layout.createSequentialGroup()
                                .addContainerGap()
                                .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 277, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                        .addComponent(submit)
                                        .addComponent(jButton3))
                                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jButton4.setText("录入考勤信息");
        jButton4.addActionListener(new java.awt.event.ActionListener() {
            @Override
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton4ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(layout.createSequentialGroup()
                                .addGap(29, 29, 29)
                                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addComponent(jButton4)
                                        .addComponent(jButton2))
                                .addGap(28, 28, 28))
        );
        layout.setVerticalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                                .addGap(32, 32, 32)
                                .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addContainerGap())
                        .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jButton4)
                                .addGap(51, 51, 51)
                                .addComponent(jButton2)
                                .addGap(72, 72, 72))
        );

        pack();
    }

    private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
        // TODO add your handling code here:
        //返回
        this.ef.setVisible(true);
        this.dispose();
    }//GEN-LAST:event_jButton3ActionPerformed

    //录入操作
    private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed
        // TODO add your handling code here:
        teacherRecordFrame trf = new teacherRecordFrame(this,teacherId);
//        this.dispose();
        this.setVisible(false);
        trf.setVisible(true);
    }//GEN-LAST:event_jButton4ActionPerformed

    //查询操作
    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        // TODO add your handling code here:
        teacherSearchFrame tsf = new teacherSearchFrame(this);
        tsf.setVisible(true);

    }//GEN-LAST:event_jButton2ActionPerformed

    private void submitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_submitActionPerformed
        // TODO add your handling code here:
        AttendanceController attendanceController = new AttendanceController();
        DefaultTableModel model = (DefaultTableModel)this.stats.getModel();
        int rowCount = model.getRowCount();
        for (int i = 0; i < rowCount; i++){
            String status = (String) model.getValueAt(i, 5);
            String id = (String)model.getValueAt(i, 6);
            attendanceController.updateAttendanceStatusById(id,status);
        }
        JOptionPane.showMessageDialog(null, "提交成功！");
    }//GEN-LAST:event_submitActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(teacherViewFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(teacherViewFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(teacherViewFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(teacherViewFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            @Override
            public void run() {
                new teacherViewFrame("餐惊恐").setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton3;
    private javax.swing.JButton jButton4;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JProgressBar jProgressBar1;
    private JScrollPane jScrollPane1;
    private JScrollPane jScrollPane3;
    private javax.swing.JTable jTable1;
    private javax.swing.JTable stats;
    private javax.swing.JButton submit;
    // End of variables declaration//GEN-END:variables

    private String teacherId;
    private int type;
    private String date;
    private String sname;
    private String classId;
    private enterFrame ef;
    private String titledborder;    //标题
    public String getTeacherId(){
        return this.teacherId;
    }

    public teacherViewFrame getTeacherViewFrame(){
        return this;
    }
}
